<?php
include 'db.php';
$siteconfig = require './siteconfig.inc.php';
$config     = array(
	/*
	 * 0:普通模式 (采用传统癿URL参数模式 )
	 * 1:PATHINFO模式(http://<serverName>/appName/module/action/id/1/)
	 * 2:REWRITE模式(PATHINFO模式基础上隐藏index.php)
	 * 3:兼容模式(普通模式和PATHINFO模式, 可以支持任何的运行环境, 如果你的环境不支持PATHINFO 请设置为3)
	 */
	'URL_MODEL'           => 1,
	'DB_TYPE'             => 'mysql',
	'DB_HOST'             => IDB_HOST,
	'DB_NAME'             => IDB_NAME,
	'DB_USER'             => IDB_USER,
	'DB_PWD'              => IDB_PWD,
	'DB_PORT'             => IDB_PORT,
	'DB_PREFIX'           => IDB_PREFIX,

	'APP_AUTOLOAD_PATH'   => '@.TagLib',
	'SESSION_AUTO_START'  => true,

	'VAR_PAGE'            => 'pageNum',

	'USER_AUTH_ON'        => false,
	'USER_AUTH_TYPE'      => 1, // 默认认证类型 1 登录认证 2 实时认证
	'USER_AUTH_KEY'       => 'authId', // 用户认证SESSION标记
	'ADMIN_AUTH_KEY'      => 'administrator',
	'USER_AUTH_MODEL'     => 'SysUser', // 默认验证数据表模型
	'AUTH_PWD_ENCODER'    => 'md5', // 用户认证密码加密方式
	'USER_AUTH_GATEWAY'   => '/Public/login', // 默认认证网关
	'NOT_AUTH_MODULE'     => 'Public', // 默认无需认证模块
	'REQUIRE_AUTH_MODULE' => '', // 默认需要认证模块
	'NOT_AUTH_ACTION'     => '', // 默认无需认证操作
	'REQUIRE_AUTH_ACTION' => '', // 默认需要认证操作
	'GUEST_AUTH_ON'       => false, // 是否开启游客授权访问
	'GUEST_AUTH_ID'       => 0, // 游客的用户ID

	'DB_LIKE_FIELDS'      => 'title|remark',
	'RBAC_ROLE_TABLE'     => 'role',
	'RBAC_USER_TABLE'     => 'role_user',
	'RBAC_ACCESS_TABLE'   => 'access',
	'RBAC_NODE_TABLE'     => 'node',

	//num_f的配置
	'PRECISION'           => 2,

	//response_status
	'RESPONSE'            => array('SUCCESS' => '1001', 'FAILED' => '1002', 'WARN' => '1003', 'SIGNFAILED' => '1004'),

	// API地址
	'ALIPAY_API'          => 'https://mapi.alipay.com/gateway.do',

	//unit
	'GOODS_UNIT'          => array('PIECE' => 1, 'PIECE_1' => 2, 'POTION' => 3, 'JAR' => 4, 'BAG' => 5, 'CHEST' => 6, 'BOX' => 7, 'PACKAGE' => 8, 'GRAM' => 9, 'GRAM500' => 10, 'TAEL'  => 11, 'CATTY' => 12, 'KG' => 13, 'TON'  => 15, 'BOTTLE' => 16, 'PIECE_2' => 17, 'TIAO' => 18, 'KUAI' => 19, 'LAN' => 20, 'ZHANG' => 21, 'BAN' => 22, 'TONG' => 23, 'BEN' => 24, 'JUAN' => 25, 'SHUANG' => 26, 'JIE' => 27),
	'GOODS_UNIT_NAME'     => array(1 => '个', 2 => '件', 3 => '份', 4  => '罐', 5  => '袋', 6 => '箱', 7 => '盒', 8 => '包',9 => '克', 10 => '500克', 11 => '两', 12 => '斤', 13 => '公斤', 15 => '吨', 16 => '瓶', 17 => '只',18 => '条', 19 => '块', 20 => '篮', 21 => '张', 22 => '板', 23 => '桶', 24 => '本', 25 => '卷', 26 => '双', 27 => '节'),

	'SALE_STATUS_NAME'    => array(0 => '不在售', 1 => '在售'),
	
	'IS_CANCLE_NAME'      => array(0 => '没有废除', 1 => '已废除'),
	'IS_ACTIVE_NAME'      => array(0 => '禁用', 1 => '激活'),
	
	'LIMIT_STATUS_NAME'   => array(0 => '无效', 1 => '生效'),
	'LIMIT_TYPE_NAME'     => array(1 => '普通', 2 => '团购'),
	
	'ORDER_TYPE_NAME' => array('common'=>'普通','groupon'=>'团购'),
	
	'ORDER_STATUS_NAME' => array(0=>'已下单',2=>'配货中',4=>'商品出库',9=>'等待收货',10=>'收货完成',20=>'已废除'),
	'SHIP_STATUS_NAME' => array(1=>'待配送',2=>'已经通知配送',10=>'已经签收'),
	
	'SHIP_COM_CODE' => array('zhaijibian'=>'宅急便'),
	
	'PAYMENT_STATUS_NAME'=>array(1=>'待支付',10=>'已支付',20=>'未支付关闭'),
	'PAYMENT_STATUS'=>array('WAITING_PAY'=>1,'PAYED_CLOSE'=>10,'UNPAY_CLOSE'=>20),
	'PAYMENT_TYPE_NAME'=>array(0=>'未选择',1=>'微信',2=>'支付宝'),
	'PAYMENT_TYPE'=>array('WAITING_CHOOSE'=>0,'WXMPAY'=>1,'ALIPAY'=>2),
	
	//区块id，具体请查看配置文件(2：网站首页，3：网站商品详情页，4：网站闪购活动，5：手机闪购活动)
	'BM_BLOCK_NAME'       => array(1=>'首页head',2=>'首页body',3=>'首页foot',4=>'推鲜',5=>'商品详情页'),
	//类型(0：配置，1：轮播图)
	'BM_TYPE_NAME'        => array(1=>'轮播图',2=>'公告',3=>'商品列表',4=>'功能模块',5=>'购买须知'),
	
	//应用分类
	'APP_CATEGORY'        => array(1 => '基础分类', 2 => '销售分类', 3 => '行政分类', 5 => '财务分类'),
	
	'ALIDAYU_CONFIG' =>array('app_key'=>'23290858',
							 'app_secret'=>'12fa795b8de8fc6a95baf0538e2ce15f'),
);

return array_merge($config, $siteconfig);
?>